<div class="modal-header">
  <div class="modal-title">{{ record.jobId ? '编辑' : '添加'}}作业</div>
</div>
<nz-spin *ngIf="!i" class="modal-spin"></nz-spin>
<sf *ngIf="i" #sf mode="edit" [schema]="schema" [ui]="ui" [formData]="i" button="none">
  <ng-template sf-template="cronExpression" let-me let-ui="ui" let-schema="schema">
    <input autocomplete="off" nz-input nz-popover nzPopoverPlacement='right' [attr.id]="me.id" [disabled]="me.disabled"
      [attr.disabled]="me.disabled" [nzSize]="ui.size" [ngModel]="me.formProperty.value"
      (ngModelChange)="me.setValue($event)" [(nzVisible)]="visible" nzPopoverTitle="编辑cron表达式"
      [nzPopoverContent]="contentTemplate" nzPopoverTrigger="click" />
    <ng-template #contentTemplate>
      <cron (ok)="me.setValue($event);visible=false" (cancel)="visible=false"></cron>
    </ng-template>
  </ng-template>
  <div class="modal-footer">
    <button nz-button type="button" (click)="close()">关闭</button>
    <button nz-button type="submit" nzType="primary" (click)="save(sf.value)" [disabled]="!sf.valid"
      [nzLoading]="http.loading">保存</button>
  </div>
</sf>
